<html>
<head><meta charset="utf-8"><title>chalk high-level overview · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk.20high-level.20overview.html">chalk high-level overview</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="192510790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk%20high-level%20overview/near/192510790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk.20high-level.20overview.html#192510790">(Apr 01 2020 at 10:55)</a>:</h4>
<p>So I put a bit of time into working on a high-level overview of how chalk works. I was toying with diagrams, in particular. I didn't quite get the diagram I wanted up yet, but I was working on this, which seemed promising:</p>
<ul>
<li><a href="https://www.lucidchart.com/invitations/accept/16761362-0a6d-41e3-8513-9e22008052fe" title="https://www.lucidchart.com/invitations/accept/16761362-0a6d-41e3-8513-9e22008052fe">Diagram: chalk-rust-ir</a></li>
</ul>
<p>My original goal to kind of depict the "big picture" of how chalk works. i.e., there is rust sources, they get converted to datums by rustc, and then chalk can get those via the <code>RustIrDatabase</code> and convert them to program clauses, and then those clauses can be used to solve goals. But I kind of got into depicting how the datums are structured, and then I thought...if this were to be finished, it'd be pretty useful too. Thoughts?</p>



<a name="192510802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk%20high-level%20overview/near/192510802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk.20high-level.20overview.html#192510802">(Apr 01 2020 at 10:55)</a>:</h4>
<p>That's using LucidChart and in principle is viewable...?</p>



<a name="192513186"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk%20high-level%20overview/near/192513186" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk.20high-level.20overview.html#192513186">(Apr 01 2020 at 11:23)</a>:</h4>
<p>I'm thinking I should adopt <a href="https://mermaid-js.github.io/mermaid/" title="https://mermaid-js.github.io/mermaid/">Mermaid</a> for this sort of thing, though</p>



<a name="194317153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk%20high-level%20overview/near/194317153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk.20high-level.20overview.html#194317153">(Apr 16 2020 at 14:59)</a>:</h4>
<p>BTW, I created <a href="https://hackmd.io/RrTxVwW7TdeZUOAItYqgPg?both" title="https://hackmd.io/RrTxVwW7TdeZUOAItYqgPg?both">this diagram</a> this morning</p>



<a name="194317170"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk%20high-level%20overview/near/194317170" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk.20high-level.20overview.html#194317170">(Apr 16 2020 at 14:59)</a>:</h4>
<p>I still feel like it's not quite the "beautiful picture" I have in my mind</p>



<a name="194317182"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk%20high-level%20overview/near/194317182" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk.20high-level.20overview.html#194317182">(Apr 16 2020 at 14:59)</a>:</h4>
<p>but getting closer ;)</p>



<a name="194317194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk%20high-level%20overview/near/194317194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk.20high-level.20overview.html#194317194">(Apr 16 2020 at 14:59)</a>:</h4>
<p>and probably good enough..</p>



<a name="194412833"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk%20high-level%20overview/near/194412833" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk.20high-level.20overview.html#194412833">(Apr 17 2020 at 09:07)</a>:</h4>
<p>one thing that seems confusing to me in that diagram is that the <code>Vec[ProgramClause]</code> is a completely different thing than <code>Vec[u32]</code> -- one means there's an actual <code>Vec&lt;ProgramClause&gt;</code> being passed around, the other refers to the type</p>



<a name="194416189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk%20high-level%20overview/near/194416189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk.20high-level.20overview.html#194416189">(Apr 17 2020 at 09:38)</a>:</h4>
<p><span class="user-mention" data-user-id="129457">@Florian Diebold</span> good point, maybe it's better now? I changed <code>Vec&lt;ProgramClause&gt;</code> to an actual program clause and a few similar things, focusing more on the kind of info being conveyed and less on the data structures</p>



<a name="194416204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk%20high-level%20overview/near/194416204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk.20high-level.20overview.html#194416204">(Apr 17 2020 at 09:38)</a>:</h4>
<p>I also discovered how to add newlines lol though mermaid doesn't handle them as "gracefully" as I might like</p>



<a name="194419021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk%20high-level%20overview/near/194419021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk.20high-level.20overview.html#194419021">(Apr 17 2020 at 10:07)</a>:</h4>
<p>yeah that seems better</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>